Skip to content

[OCTRL-1092] Add metrics to TryTransition#814

Merged
knopers8 merged 1 commit intomasterfrom
TryMetrics
Apr 30, 2026
Merged

[OCTRL-1092] Add metrics to TryTransition#814
knopers8 merged 1 commit intomasterfrom
TryMetrics

Conversation

@justonedev1
Copy link
Copy Markdown
Collaborator

No description provided.

@justonedev1 justonedev1 requested a review from knopers8 as a code owner April 28, 2026 08:36
Comment thread common/monitoring/metric.go Outdated
TIMEOUT = "timeout"
)

func (metric *Metric) AddErr(err error) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (metric *Metric) AddErr(err error) {
func (metric *Metric) AddResult(err error) {

How about that, given that it modifies the metric even when error is nil?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you cannot do this in golang as there already exists AddResult. Function overloading isn't allowed in go.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aah, right, i completely missed that.

Copy link
Copy Markdown
Collaborator

@knopers8 knopers8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@knopers8 knopers8 merged commit 21dd064 into master Apr 30, 2026
4 checks passed
@knopers8 knopers8 deleted the TryMetrics branch April 30, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants